package com.atguigu.lease.common.utils;

import java.util.Random;

/**
 * @Author 27435
 * @Version 1.0
 * @Description
 * @Date 2025/2/28 21:03
 */

public class CodeUtil {

    public static String getRandomCode(Integer length){
        StringBuilder builder = new StringBuilder();
        Random random = new Random();
        for (Integer i = 0; i < length; i++) {
            int num = random.nextInt(10);
            builder.append(num);
        }
        return builder.toString();
    }

}
